<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Running the test suite under Windows</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
    <link rel="up" href="build_win.html" title="Chapter 5.  Building Berkeley DB for Windows" />
    <link rel="prev" href="build_win_small.html" title="Building a small memory footprint library" />
    <link rel="next" href="build_win_notes.html" title="Windows notes" />
  </head>
  <body>
    <div xmlns="" class="navheader">
      <div class="libver">
        <p>Library Version 12.1.6.2</p>
      </div>
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Running the test suite under
        Windows</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="build_win_small.html">Prev</a> </td>
          <th width="60%" align="center">Chapter 5.  Building Berkeley DB for Windows </th>
          <td width="20%" align="right"> <a accesskey="n" href="build_win_notes.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="build_win_test"></a>Running the test suite under
        Windows</h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <dl>
          <dt>
            <span class="sect2">
              <a href="build_win_test.html#idm140188018513168">Building the software needed
            by the tests</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_win_test.html#idm140188018829152">Running the test suite under Windows</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_win_test.html#build_win_test_sql">Building the software
            needed by the SQL tests</a>
            </span>
          </dt>
        </dl>
      </div>
      <p> 
        To build the test suite on Windows platforms, you will need
        to configure Tcl support. You will also need sufficient main
        memory (at least 64MB), and disk (around 250MB of disk will be
        sufficient). 
    </p>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idm140188018513168"></a>Building the software needed
            by the tests</h3>
            </div>
          </div>
        </div>
        <p>
            The test suite must be run against a Debug version of
            Berkeley DB, so you will need a Debug version of the Tcl
            libraries. This involves building Tcl from its source. See
            the Tcl sources for more information. Then build the Tcl
            API - see <a class="xref" href="build_win_tcl.html" title="Building the Tcl API">Building the Tcl API</a> for details. 
        </p>
        <div class="sect3" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h4 class="title"><a id="idm140188018488688"></a>Visual Studio 2008 or newer</h4>
              </div>
            </div>
          </div>
          <p>
                To build for testing, perform the following steps: 
            </p>
          <div class="orderedlist">
            <ol type="1">
              <li>
                    Open the Berkeley DB solution.
                </li>
              <li> 
                    Ensure that the target configuration is
                    Debug 
                </li>
              <li>
                    Right click the <span class="emphasis"><em>db_tcl</em></span>
                    project in the Solution Explorer, and select
                        <span class="emphasis"><em>Build</em></span>.
                </li>
              <li>
                    Right click the
                    <span class="emphasis"><em>db_test</em></span> project in the
                    Solution Explorer, and select
                    <span class="emphasis"><em>Build</em></span>.
                </li>
            </ol>
          </div>
        </div>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idm140188018829152"></a>Running the test suite under Windows</h3>
            </div>
          </div>
        </div>
        <p>
            Before running the tests for the first time, you must
            edit the file <code class="filename">include.tcl</code> in your
            build directory and change the line that reads: 
        </p>
        <pre class="programlisting">set tclsh_path SET_YOUR_TCLSH_PATH</pre>
        <p> 
            You will want to use the location of the
            <code class="filename">tclsh</code> program (be sure to include
            the name of the executable). For example, if Tcl is
            installed in <code class="filename">d:\tcl</code>, this line should
            be the following: 
        </p>
        <pre class="programlisting">set tclsh_path d:\tcl\bin\tclsh85.exe</pre>
        <p>
            If your path includes spaces be sure to enclose it in
            quotes: 
        </p>
        <pre class="programlisting">set tclsh_path "c:\Program Files\tcl\bin\tclsh85.exe"</pre>
        <p>
            Make sure that the path to Berkeley DB's tcl library is
            in your current path.  Edit your PATH using the Control 
            Panel -&gt; System -&gt; Advanced system settings
            -&gt; Environment Variables dialog. On earlier versions of
            Windows, you may find it convenient to add a line to
            c:\AUTOEXEC.BAT:
        </p>
        <pre class="programlisting">SET PATH=%PATH%;c:\db\build_windows</pre>
        <p> 
            Then, in a shell of your choice enter the following
            commands: 
        </p>
        <div class="orderedlist">
          <ol type="1">
            <li>
                cd build_windows 
            </li>
            <li> 
                run
                <code class="filename">d:\tcl\bin\tclsh85.exe</code>, or the
                equivalent name of the Tcl shell for your system.
                    <p> 
                    You should get a "%" prompt. 
                    </p></li>
            <li> 
                % source ../test/tcl/test.tcl 
                <p> 
                    If no
                    errors occur, you should get a "%" prompt.
                </p></li>
          </ol>
        </div>
        <p>
            You are now ready to run tests in the test suite; see
            Running the test suite for more information.
        </p>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="build_win_test_sql"></a>Building the software
            needed by the SQL tests</h3>
            </div>
          </div>
        </div>
        <p> 
            The SQL test suite must be run against a Debug version
            of Berkeley DB, so you need a Debug version of the Tcl
            libraries. This involves building Tcl from its source. See
            the Tcl sources for more information. Then build the Tcl
            API - see <a class="xref" href="build_win_tcl.html" title="Building the Tcl API">Building the Tcl API</a> for details.
        </p>
        <p> 
            Before building for SQL tests, build the db_tcl and
            db_sql_testfixture projects. This requires Tcl 8.5 or
            above. If you are using a later version of Tcl, edit the
            Tcl library that db_tcl and db_sql_testfixture link to. 
        </p>
        <p>
            To do this right click the
            <span class="emphasis"><em>db_tcl</em></span><code class="literal">/</code><span class="emphasis"><em>db_sql_testfixture</em></span>
            project, select <span class="emphasis"><em>Properties -&gt; Configuration
            Properties -&gt; Linker -&gt; Input -&gt; Additional
            Dependencies</em></span> and edit the Tcl library,
            <span class="emphasis"><em>tcl85.lib</em></span>, to match the version
            you are using.
        </p>
        <p>
            Building the db_sql_testfixture project builds the
            testfixture.exe program in
            <code class="literal">../build_windows/Win32/Debug</code>. It
            also builds the projects db and db_sql, on which it
            depends. 
        </p>
        <div class="sect3" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h4 class="title"><a id="idm140188018464272"></a>Visual Studio 2008 or newer</h4>
              </div>
            </div>
          </div>
          <p>
                To build for testing, perform the following steps:
            </p>
          <div class="orderedlist">
            <ol type="1">
              <li> 
                    Open the Berkeley DB solution. 
                </li>
              <li>
                    Ensure that the target configuration is
                    Debug.
                </li>
              <li>
                    Right click the <span class="emphasis"><em>db_tcl</em></span>
                    project in the Solution Explorer, and select
                    <span class="emphasis"><em>Build</em></span>. 
                </li>
              <li>
                    Right click the
                    <span class="emphasis"><em>db_sql_testfixture</em></span>
                    project in the Solution Explorer, and select
                    <span class="emphasis"><em>Build</em></span>. 
                </li>
            </ol>
          </div>
          <p>
                To test extensions, specify the following in the
                <span class="emphasis"><em>Preprocessor Definitions</em></span> of
                the <span class="emphasis"><em>db_sql_testfixture</em></span> project: 
            </p>
          <div class="itemizedlist">
            <ul type="disc">
              <li><code class="literal">
                    SQLITE_ENABLE_FTS3</code> to enable
                    the full text search layer 
                </li>
              <li><code class="literal">
                    SQLITE_ENABLE_RTREE</code> to enable
                    the R-Tree layer 
                </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="build_win_small.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="build_win.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="build_win_notes.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Building a small memory
        footprint library </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Windows notes</td>
        </tr>
      </table>
    </div>
  </body>
</html>
